package code.juc.stream;

import java.io.PipedReader;

/**
 * 读线程
 */
public class ThreadRead implements Runnable {
    private ReadData readData;
    private PipedReader reader;

    public ThreadRead(ReadData readData, PipedReader reader) {
        this.readData = readData;
        this.reader = reader;
    }

    @Override
    public void run() {
        readData.readData(reader);
    }
}
